package com.qf.controller;

import com.qf.pojo.req.ReqDrug;
import com.qf.pojo.resp.Resultmsg;
import com.qf.service.DrugService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName DrugController
 * @Description
 * @Author lanzhike
 * @Date 2023/8/11/0011 下午 04:58
 * @Version 1.0
 * 药品模块后端数据访问接口
 */
@RestController
@RequestMapping("/drugCart")
public class DrugCartController {

    @Autowired
    DrugService drugService;

    @RequestMapping("/addDrugCat")
    public Resultmsg addShopCat(@RequestBody ReqDrug reqDrug, HttpServletRequest httpServletRequest){
        return drugService.addShopCat(reqDrug,httpServletRequest);
    }

    @RequestMapping("/getDrugCat")
    public Resultmsg addShopCat(HttpServletRequest httpServletRequest){
        return drugService.getDrugCat(httpServletRequest);
    }


}
